﻿
@{
    ViewBag.Title = "CKProcedureDetail";
}

@using System.Collections.Generic;
@using hc.epm.DataModel.Business;
@using hc.epm.Common;
@using hc.Plat.Common.Extend;
@model Epm_TimeLimitAndProcedure
<style>
    input[type="text"] {
        padding-left: 15px;
    }

    .long-text-other input {
        height: 35px;
        margin-bottom: 15px;
        border: 1px solid #C7C7C7;
        box-sizing: border-box;
    }

    .addother {
        width: 100px;
        height: 25px;
        margin-left: 124px;
        margin-bottom: 15px;
        font-size: 16px;
    }

    .inputone {
        display: inline-block;
        height: 30px;
        width: 108px !important;
        line-height: 30px;
        border: 1px solid #C7C7C7;
        box-sizing: border-box;
        margin-bottom: 15px;
    }

    .inputTwo {
        display: inline-block;
        box-sizing: border-box;
        padding-left: 15px;
        height: 30px;
        line-height: 30px;
        border: 1px solid #C7C7C7;
        border-radius: 1px;
        margin-bottom: 15px;
    }

    .default {
        background: #ebebe5;
    }
</style>
<link href="~/Resource/css/ProjectManagement.css" rel="stylesheet" />
<div class="contentData">
    <form>
        <ul class="tab-list">
            <li id="Detail">基本信息</li>
            <li id="DetailApprovalConstitute">总批复构成</li>
            <li id="DetailProjectISP">工程服务商</li>
            <li id="DetailProjectMainPoint">工程要点</li>
            <li id="DetailTimeManage">工期管理</li>
            <li id="DetailMilestonePlan">工程节点</li>
            <li id="ScheduleInfo">进度跟踪</li>
            <li id="VisaInfo">签证信息</li>
            <li id="QuestionInfo">问题信息</li>
            <li id="ChangeInfo">变更信息</li>
            <li id="ContractInfo">合同信息</li>
            <li id="DetailCrossingsManage" class="active">外部手续</li>
            <li id="video">视频集成</li>
        </ul>
        <div class="tab">
            <div class="long-text">
                @if (Model == null)
            {
                    <input type="hidden" id="ProjectId" name="ProjectId" value="" />
                }
                @if (Model != null)
            {
                    <input type="hidden" id="ProjectId" name="ProjectId" value="@Model.ProjectId" />
                }
                <table class="datalist" style="word-break:break-all;word-wrap:break-word;margin-top:10px;">
                    @if (Model != null)
                    {
                        <tbody>
                            <tr>
                                <td class="table_title"><i class="color_red">*</i>  外部手续:</td>
                                <td class="td-div" colspan="5">
                                    @if (Model.IsCrossings == true)
                                    {
                                        <div>办理</div>
                                    }
                                    @if (Model.IsCrossings == false)
                                    {
                                        <div>无</div>
                                    }
                                </td>
                            </tr>
                            @if (Model.IsCrossings == true)
                            {
                                <tr>
                                    <td colspan="4">
                                        <table class="datalist fileShow" style="word-break:break-all;word-wrap:break-word;margin-top:10px;">
                                            <tbody class="fileShow-append" id="JHMX">
                                                <tr class="headtr">
                                                    <th class="table_title" style="width: 219px;">序号</th>
                                                    <th class="td-div">附件名称</th>
                                                    <th class="td-div">操作</th>

                                                </tr>
                                                @{
                                                    int index = 0;
                                                }
                                                @if (Model != null)
                                                {
                                                    if (Model.TzAttachs != null && Model.TzAttachs.Count() > 0)
                                                    {


                                                        foreach (var item in Model.TzAttachs)
                                                        {
                                                            index++;

                                                            if (item.TypeNo == "SHOUXU")
                                                            {
                                                                <tr>
                                                                    <td>@item.Sort</td>
                                                                    <td>@item.Name</td>
                                                                    <td><a class="fileDel downloadFile" href="javascript:void(0)" data-url="@item.FilePath" data-name="@item.Name" style="color:#337ab7;">下载</a></td>
                                                                </tr>
                                                            }
                                                        }
                                                    }
                                                }

                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                                    }

                        </tbody>
                                                    }

                </table>
            </div>
        </div>
    </form>
</div>
<script src="~/Resource/plugins/layui-2.1.2/lay/modules/layer.js"></script>
<script>
    $(document).ready(function () {
        $("#Detail").click(function () {
            window.location.href = 'Detail?projectId=@ViewBag.ProjectId';
        });
        $("#DetailApprovalConstitute").click(function () {
            window.location.href = 'DetailApprovalConstitute?projectId=@ViewBag.ProjectId';
        });
        $("#DetailProjectMainPoint").click(function () {
            window.location.href = 'DetailProjectMainPoint?projectId=@ViewBag.ProjectId';
        });
        $("#DetailTimeManage").click(function () {
            window.location.href = 'CKTimeLimitDetail?projectId=@ViewBag.ProjectId';
        });
        $("#DetailMilestonePlan").click(function () {
            window.location.href = 'DetailMilestonePlan?projectId=@ViewBag.ProjectId';
        });
        $("#DetailProjectISP").click(function () {
            window.location.href = 'DetailProjectISP?projectId=@ViewBag.ProjectId';
        });
        $("#DetailProjectData").click(function () {
            window.location.href = 'DetailProjectData?projectId=@ViewBag.ProjectId';
        });
        $("#ScheduleInfo").click(function () {
            window.location.href = 'ScheduleInfo?projectId=@ViewBag.ProjectId';
        });
        $("#ContractInfo").click(function () {
            window.location.href = 'ContractInfo?projectId=@ViewBag.ProjectId';
        });
        $("#ChangeInfo").click(function () {
            window.location.href = 'ChangeInfo?projectId=@ViewBag.ProjectId';
        });
        $("#VisaInfo").click(function () {
            window.location.href = 'VisaInfo?projectId=@ViewBag.ProjectId';
        });
        $("#QuestionInfo").click(function () {
            window.location.href = 'QuestionInfo?projectId=@ViewBag.ProjectId';
        });
        $("#DetailCrossingsManage").click(function () {
            window.location.href = 'CKProcedureDetail?projectId=@ViewBag.ProjectId';
        });
        $("#video").click(function () {
            window.location.href = 'Video?projectId=@ViewBag.ProjectId';
        });
        $("body").on("click", ".dynamicAdd", function () {
            $(this).parent().find("input[type='text']").addClass("default").attr({ readonly: 'true' });
            $(this).hide();
            $(this).parent().find(".dynamicEdit").show();
        });
        $("body").on("click", ".dynamicEdit", function () {
            $(this).parent().find("input[type='text']").removeClass("default").removeAttr("readonly");
            $(this).hide().parent().find(".dynamicAdd").show();
        });
        //下载附件
        $("body").on("click", ".downloadFile", function () {
            var path = $(this).data("url");
            var fileName = $(this).data("name");
            window.location.href = "/Download/DownLoadHB?path=" + path + "&fileName=" + fileName;
        });
    });
</script>

